package com.dingreading.cloud.admin.mapper;

import com.alibaba.fastjson.JSONObject;
import com.dingreading.cloud.admin.entity.WhStockIn;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 映射层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface WhStockInMapper extends BaseMapper<WhStockIn> {

    List<WhStockIn> getOkGoodsTypeUsableNumLog(@Param("goodsTypeId") Long goodsTypeId, @Param("buyNum") Integer buyNum);

    int updateUsableNum(@Param("map") Map<Long, Integer> map, @Param("ids") List<Long> ids, @Param("time") String time);

    List<JSONObject> getRealNumAndUsableNumByPurchaseCode(@Param("purchaseCodes") List<String> purchaseCodes);
}
